package net.prasenjit.test.webmvc.model;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;

@XmlRootElement
public class Organization implements Serializable {
    private static final long serialVersionUID = -9150205099633014004L;

    @Id
    private String id;

    @NotEmpty(message = "bvl1")
    @Size(min = 10, max = 50, message = "bvl2")
    @Pattern(regexp = "[a-zA-Z]+", message = "bvl3")
    private String name;

    private Person person;

    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
